<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.domain.*"%>
<%@ page import="com.dao.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册用户列表</title>
</head>
<body style ="text-align:center;">
<%
Userdao dao = new Userdao();
List<User> list = dao.findAll();
%>
<table border=1 style="width:100%;border:1px solid #3399cc;
border-collapse: collapse;padding:5px 0px 5px 2px;">
<tr><td colspan=3 align=center>注册用户信息</td></tr>
<tr>
<td>序号</td>
<td>用户名</td>
<td>邮箱</td>
</tr>
<c:forEach var="user" items="<%=list%>" varStatus="status">
<tr>
<td>${status.count}</td>
<td>${user.name}</td>
<td>${user.email}</td>
</tr>
</c:forEach>
</table>

</body>
</html>